package org.example.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import javax.xml.bind.annotation.XmlEnum;

/**
 * 业务响应码和说明
 * 不同于http响应码，代表的是具体的业务错误
 */
@Getter
@AllArgsConstructor
public enum BusinessErrorCode {
    UNKNOWN_ERROR(1000, "操作失败"),
    USER_NOT_FOUND(1001, "用户不存在"),
    USER_NAME_PRESENCE(1002,"用户名存在"),

    Goods_NOT_FOUND(1003,"商品不存在"),


    CATEGORY_NAME_PRESENCE(1011, "分类名已经存在"),
    CATEGORY_NAME_NOT_FOU(1012, "分类名不存在"),
    CATEGORY_ID_NOT_FOU(1013, "分类名不存在");

    final int code;
    final String message;
}
